package demo.spring.cloud.eureka.consumer;

import dmeo.spring.cloud.eureka.provider.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by lushun.chen on 2017/4/7.
 *
 * @author lushun.chen
 */
@RestController
public class RibbonController {
    @Autowired
    private RibbonService ribbonService;

    @RequestMapping("/ribbon/{id}")
    public User findById(@PathVariable Long id) {
        return ribbonService.findById(id);
    }

}
